- if params[:controller] == 'categories'
  - css_class = 'active'
- else
  - css_class = 'inactive'

- if Category.all.any?
  %li{:class => 'dropdown ' + css_class}
    %a.dropdown-toggle{:href => categories_path, 'data-target' => '#', 'data-toggle' => 'dropdown'}
      =:categories.l
      %b.caret
    %ul.dropdown-menu
      -for category in Category.order('name')
        %li=link_to category.name, category
